473,473 Members | 2,060 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

css vertical navbar spacing browser compatibility

I made a vertical navbar using a background image for the buttons. When
I tested under FF or Opera, it looks fine, with the buttons touching
vertically. However, in IE6 the buttons are spaced apart vertically by
the amount of padding I used to vertically center the text on the
button. IE7 has vertical spacing also, but only a small amount.

Any suggestions on how to handle this difference?

To see the buttons with the padding,
www.powell-electric.com/nav_pad.html
and without at,
www.powell-electric.com/nav_nopad.html

The stylesheet with the padding is:
#navcontainer ul {
list-style-type: none;
text-align: left;
padding: 0;
margin: 0;
}

#navcontainer ul li {
background: transparent url(state_up.gif) top left no-repeat;
width: 130px;
height: 32px;
}
#navcontainer ul li a {
text-align:center;
padding-top: 7px;
font: normal 12px "Lucida Grande", "Lucida Sans Unicode", verdana,
lucida, sans-serif;
text-decoration: none;
display: block;
height: 100%;
color: #00c;
}

Jun 18 '06 #1
2 3204
I figured that if I reduced the height of the anchor element to 25px,
that the 7px plus that set the element's height to 32px.

Why does IE(6&7) both have a margin of 1px vertical space between the
buttons, whereas FF and Opera do not?

TIA, larzeb

Jun 18 '06 #2
To further the education of mankind, la********@yahoo.com vouchsafed:
I figured that if I reduced the height of the anchor element to 25px,
that the 7px plus that set the element's height to 32px.

Why does IE(6&7) both have a margin of 1px vertical space between the
buttons, whereas FF and Opera do not?


Actually, on both your examples I saw no difference between ie6 and ff.

--
Neredbojias
Infinity has its limits.
Jun 19 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: abracad | last post by:
Hi Is it possible to vertically align an image in the middle of a DIV of fixed height?
13
by: Dave | last post by:
Hi, what Property and Values are used to space out further from one another the items in a list (assuming it's possible)? The default presentation is a bit "bunched up" for me. Thanks, Dave
5
by: Applebrown | last post by:
Hello, basically, I'm just learning intermediate CSS and trying to convert my old table webpage completely to CSS. Hoorah, right? Well, it's not quite going as planned. It's an extremely simple...
38
by: Xah Lee | last post by:
sometimes i wish to add white space in <p> as to achived effects similar to tab. what should i do? using empty image seems the sure way but rather complicated. (and dosen't change size with...
0
by: Old Wolf | last post by:
I have a site that I laid out with tables, and lots of grotty hacks and lots of markup generated by client-side javascript. I'm in the process of converting it to "nice" CSS code but have got...
5
by: Goldy | last post by:
Hello, w/ code like this: <table border="0" cellspacing="0" cellpadding="0"> <asp:Repeater runat="server" id="op"> <HeaderTemplate></HeaderTemplate> <ItemTemplate> <tr> <td...
18
by: ~john | last post by:
Sorry if this is a dumb question buy my CSS is pretty bad... but how do I get text to center vertically within a div tag? Here's my code below... the text is displaying on the far top-right. I...
7
by: Xah Lee | last post by:
Look at this page http://xahlee.org/emacs/wrap-url.html Look at it in Firebox, look at it in Safari, in Opera, and look at it in Microsoft Internet Explorer. The only fucked up case, is...
1
by: dave8421 | last post by:
Hi, I have a (strict) html document with the following portion: <ul> <li><img alt="" src="images/image1.jpg" /></li> <li><img alt="" src="images/image2.jpg" /></li> <li><img alt=""...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.